package com.xzy.service.impl;

import com.xzy.dao.HoleMapper;
import com.xzy.entity.Hole;
import com.xzy.service.HoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HoleServiceImpl implements HoleService {
    @Autowired
    HoleMapper holeMapper;
    @Override
    public void addHole(Hole hole) {
        holeMapper.addHole(hole);
    }

    @Override
    public void updateHole(Hole hole) {
         holeMapper.updateHole(hole);
    }

    @Override
    public List<Hole> getHoleByType(String holeType) {

        return holeMapper.getHoleByType(holeType);
    }

    @Override
    public List<Hole> findAll() {
        return holeMapper.findAll();
    }

    @Override
    public Hole getHoleById(int holeId) {
        return holeMapper.getHoleById(holeId);
    }

    @Override
    public void deleteHole(int holeId) {
        holeMapper.deleteHole(holeId);
    }

}
